0 JBC
↳1 JBCToGraph (⇒, 230 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIDPv1Proof (⇒, 100 ms)
↳6 IDP
↳7 IDPNonInfProof (⇒, 50 ms)
↳8 IDP
↳9 IDependencyGraphProof (⇔, 0 ms)
↳10 TRUE
public class LogMult{
public static int log(int x, int y) {
int res = 1;
if (x < 0 || y < 1) return 0;
else {
while (x > y) {
y = y*y;
res = 2*res;
}
}
return res;
}
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
log(x,2);
}
}
public class Random {
static String[] args;
static int index = 0;
public static int random() {
String string = args[index];
index++;
return string.length();
}
}
Generated 14 rules for P and 0 rules for R.
P rules:
454_0_log_Load(EOS(STATIC_454), i30, i30, i61, i30) → 457_0_log_LE(EOS(STATIC_457), i30, i30, i61, i30, i61)
457_0_log_LE(EOS(STATIC_457), i30, i30, i61, i30, i61) → 460_0_log_LE(EOS(STATIC_460), i30, i30, i61, i30, i61)
460_0_log_LE(EOS(STATIC_460), i30, i30, i61, i30, i61) → 465_0_log_Load(EOS(STATIC_465), i30, i30, i61) | >(i30, i61)
465_0_log_Load(EOS(STATIC_465), i30, i30, i61) → 468_0_log_Load(EOS(STATIC_468), i30, i30, i61, i61)
468_0_log_Load(EOS(STATIC_468), i30, i30, i61, i61) → 472_0_log_IntArithmetic(EOS(STATIC_472), i30, i30, i61, i61)
472_0_log_IntArithmetic(EOS(STATIC_472), i30, i30, i61, i61) → 477_0_log_Store(EOS(STATIC_477), i30, i30, *(i61, i61)) | &&(>(i61, 1), >(i61, 1))
477_0_log_Store(EOS(STATIC_477), i30, i30, i67) → 481_0_log_ConstantStackPush(EOS(STATIC_481), i30, i30, i67)
481_0_log_ConstantStackPush(EOS(STATIC_481), i30, i30, i67) → 483_0_log_Load(EOS(STATIC_483), i30, i30, i67)
483_0_log_Load(EOS(STATIC_483), i30, i30, i67) → 485_0_log_IntArithmetic(EOS(STATIC_485), i30, i30, i67)
485_0_log_IntArithmetic(EOS(STATIC_485), i30, i30, i67) → 486_0_log_Store(EOS(STATIC_486), i30, i30, i67)
486_0_log_Store(EOS(STATIC_486), i30, i30, i67) → 487_0_log_JMP(EOS(STATIC_487), i30, i30, i67)
487_0_log_JMP(EOS(STATIC_487), i30, i30, i67) → 505_0_log_Load(EOS(STATIC_505), i30, i30, i67)
505_0_log_Load(EOS(STATIC_505), i30, i30, i67) → 450_0_log_Load(EOS(STATIC_450), i30, i30, i67)
450_0_log_Load(EOS(STATIC_450), i30, i30, i61) → 454_0_log_Load(EOS(STATIC_454), i30, i30, i61, i30)
R rules:
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
454_0_log_Load(EOS(STATIC_454), x0, x0, x1, x0) → 454_0_log_Load(EOS(STATIC_454), x0, x0, *(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))
R rules:
Filtered ground terms:
454_0_log_Load(x1, x2, x3, x4, x5) → 454_0_log_Load(x2, x3, x4, x5)
EOS(x1) → EOS
Cond_454_0_log_Load(x1, x2, x3, x4, x5, x6) → Cond_454_0_log_Load(x1, x3, x4, x5, x6)
Filtered duplicate args:
454_0_log_Load(x1, x2, x3, x4) → 454_0_log_Load(x3, x4)
Cond_454_0_log_Load(x1, x2, x3, x4, x5) → Cond_454_0_log_Load(x1, x4, x5)
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
454_0_log_Load(x1, x0) → 454_0_log_Load(*(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))
R rules:
Finished conversion. Obtained 2 rules for P and 0 rules for R. System has predefined symbols.
P rules:
454_0_LOG_LOAD(x1, x0) → COND_454_0_LOG_LOAD(&&(>(x1, 1), <(x1, x0)), x1, x0)
COND_454_0_LOG_LOAD(TRUE, x1, x0) → 454_0_LOG_LOAD(*(x1, x1), x0)
R rules:
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Boolean, Integer
(0) -> (1), if (x1[0] > 1 && x1[0] < x0[0] ∧x1[0] →* x1[1]∧x0[0] →* x0[1])
(1) -> (0), if (x1[1] * x1[1] →* x1[0]∧x0[1] →* x0[0])
(1) (&&(>(x1[0], 1), <(x1[0], x0[0]))=TRUE∧x1[0]=x1[1]∧x0[0]=x0[1] ⇒ 454_0_LOG_LOAD(x1[0], x0[0])≥NonInfC∧454_0_LOG_LOAD(x1[0], x0[0])≥COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])∧(UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥))
(2) (>(x1[0], 1)=TRUE∧<(x1[0], x0[0])=TRUE ⇒ 454_0_LOG_LOAD(x1[0], x0[0])≥NonInfC∧454_0_LOG_LOAD(x1[0], x0[0])≥COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])∧(UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥))
(3) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(4) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(5) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(6) (x1[0] ≥ 0∧x0[0] + [-3] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[(-1)bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] + [(-1)bni_13]x1[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(7) (x1[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])), ≥)∧[(2)bni_13 + (-1)Bound*bni_13] + [bni_13]x0[0] ≥ 0∧[2 + (-1)bso_14] ≥ 0)
(8) (&&(>(x1[0], 1), <(x1[0], x0[0]))=TRUE∧x1[0]=x1[1]∧x0[0]=x0[1]∧*(x1[1], x1[1])=x1[0]1∧x0[1]=x0[0]1 ⇒ COND_454_0_LOG_LOAD(TRUE, x1[1], x0[1])≥NonInfC∧COND_454_0_LOG_LOAD(TRUE, x1[1], x0[1])≥454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])∧(UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥))
(9) (>(x1[0], 1)=TRUE∧<(x1[0], x0[0])=TRUE ⇒ COND_454_0_LOG_LOAD(TRUE, x1[0], x0[0])≥NonInfC∧COND_454_0_LOG_LOAD(TRUE, x1[0], x0[0])≥454_0_LOG_LOAD(*(x1[0], x1[0]), x0[0])∧(UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥))
(10) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[-2 + (-1)bso_16] + [-1]x1[0] + x1[0]2 ≥ 0)
(11) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[-2 + (-1)bso_16] + [-1]x1[0] + x1[0]2 ≥ 0)
(12) (x1[0] + [-2] ≥ 0∧x0[0] + [-1] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[-2 + (-1)bso_16] + [-1]x1[0] + x1[0]2 ≥ 0)
(13) (x1[0] ≥ 0∧x0[0] + [-3] + [-1]x1[0] ≥ 0 ⇒ (UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-3)bni_15 + (-1)Bound*bni_15] + [bni_15]x0[0] + [(-1)bni_15]x1[0] ≥ 0∧[(-1)bso_16] + [3]x1[0] + x1[0]2 ≥ 0)
(14) (x1[0] ≥ 0∧x0[0] ≥ 0 ⇒ (UIncreasing(454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])), ≥)∧[(-1)Bound*bni_15] + [bni_15]x0[0] ≥ 0∧[(-1)bso_16] + [3]x1[0] + x1[0]2 ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(454_0_LOG_LOAD(x1, x2)) = [1] + x2 + [-1]x1
POL(COND_454_0_LOG_LOAD(x1, x2, x3)) = [-1] + x3 + [-1]x2 + [-1]x1
POL(&&(x1, x2)) = 0
POL(>(x1, x2)) = [-1]
POL(1) = [1]
POL(<(x1, x2)) = [-1]
POL(*(x1, x2)) = x1·x2
454_0_LOG_LOAD(x1[0], x0[0]) → COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])
454_0_LOG_LOAD(x1[0], x0[0]) → COND_454_0_LOG_LOAD(&&(>(x1[0], 1), <(x1[0], x0[0])), x1[0], x0[0])
COND_454_0_LOG_LOAD(TRUE, x1[1], x0[1]) → 454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])
COND_454_0_LOG_LOAD(TRUE, x1[1], x0[1]) → 454_0_LOG_LOAD(*(x1[1], x1[1]), x0[1])
&&(TRUE, TRUE)1 ↔ TRUE1
&&(TRUE, FALSE)1 ↔ FALSE1
&&(FALSE, TRUE)1 ↔ FALSE1
&&(FALSE, FALSE)1 ↔ FALSE1
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer